package com.jhgsys.internal.hazard.service;

import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jhgsys.internal.common.exception.FebsException;
import com.jhgsys.internal.hazard.dto.HazardExamineDto;
import com.jhgsys.internal.hazard.entity.HazardExamine;

import java.util.List;

/**
 *  Service接口
 *
 * @author admin
 * @date 2024-08-19 14:13:44
 */
public interface IHazardExamineService extends IService<HazardExamine> {
    /**
     * 查询（分页）
     * @author admin
     * @date 2024-08-19 14:13:44
     * @param request QueryRequest
     * @param hazardExamine hazardExamine
     * @return IPage<HazardExamine>
     */
    IPage<HazardExamineDto> findHazardExaminePage(QueryRequest request, HazardExamineDto hazardExamineDto);

    /**
     * 查询（分页）包含安全记录录入信息
     * @author admin
     * @date 2024-08-19 14:13:44
     * @param request QueryRequest
     * @param hazardExamine hazardExamine
     * @return IPage<HazardExamine>
     */
    IPage<HazardExamineDto> findHazardExaminePageWithRecords(QueryRequest request, HazardExamineDto hazardExamineDto);

    /**
     * 查询（所有）
     * @author admin
     * @date 2024-08-19 14:13:44
     * @param hazardExamine hazardExamine
     * @return List<HazardExamine>
     */
    List<HazardExamine> findHazardExamineList(HazardExamine hazardExamine);

    /**
    * 根据ID查询
    * @author admin
    * @date 2024-08-19 14:13:44
    * @param id
    * @return HazardExamine
    */
    HazardExamineDto findHazardExamineById(String id);

    /**
     * 新增
     * @author admin
     * @date 2024-08-19 14:13:44
     * @param hazardExamine hazardExamine
     */
    void createHazardExamine(HazardExamine hazardExamine);

    /**
     * 修改
     * @author admin
     * @date 2024-08-19 14:13:44
     * @param hazardExamine hazardExamine
     */
    void updateHazardExamine(HazardExamineDto hazardExamineDto);

    /**
     * 逻辑删除
     * @author admin
     * @date 2024-08-19 14:13:44
     * @param hazardExamine hazardExamine
     * @param hazardExamineIds hazardExamineIds
     */
    void deleteHazardExamine(HazardExamine hazardExamine,String hazardExamineIds);

    /**
    * 物理删除
    * @author admin
    * @date 2024-08-19 14:13:44
    * @param hazardExamineIds hazardExamineIds
    */
    void physicallyDeleteHazardExamine(String hazardExamineIds);

    /**
     * 生成检查编号  年+公司编码+序列号（5位）
     * @author admin
     * @date 2024-08-07 16:43:01
     * @param tenantId 公司ID
     */
    String createExamineNo(String tenantId) throws FebsException;

    /**
     * 校验安全检查是否关闭
     * @author admin
     * @date 2024-08-07 16:43:01
     * @param examineId 主键ID
     */
    Boolean ifClosed(String examineId) ;
}
